home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / dosex / ex4.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  583 b   |  33 lines

  1. Program Example4;
  2. uses Dos;
  3.  
  4. { Program to demonstrate the PackTime and UnPackTime functions. }
  5.  
  6. var
  7.   DT   : DateTime;
  8.   Time : longint;
  9. begin
  10.   with DT do
  11.    begin
  12.      Year:=1998;
  13.      Month:=11;
  14.      Day:=11;
  15.      Hour:=11;
  16.      Min:=11;
  17.      Sec:=11;
  18.    end;
  19.   PackTime(DT,Time);
  20.   WriteLn('Packed Time : ',Time);
  21.   UnPackTime(Time,DT);
  22.   WriteLn('Unpacked Again:');
  23.   with DT do
  24.    begin
  25.      WriteLn('Year  ',Year);
  26.      WriteLn('Month ',Month);
  27.      WriteLn('Day   ',Day);
  28.      WriteLn('Hour  ',Hour);
  29.      WriteLn('Min   ',Min);
  30.      WriteLn('Sec   ',Sec);
  31.    end;     
  32. end.
  33.